<?php

namespace app\admin\model;

use support\Model;

/**
 * bot_command 机器人命令
 * @property integer $id (主键)
 * @property string $alias 命令别名
 * @property string $class 命令类名
 * @property integer $bot_id 所属机器人
 */
class BotCommand extends Model
{

    
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'bot_command';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $primaryKey = 'id';

    /**
     * Indicates if the model should be timestamped.
     *
     * @var bool
     */
    public $timestamps = false;
    
    /**
     * 关联机器人
     */
    public function bot(){
        return $this->belongsTo(Bot::class, 'bot_id', 'id');
    }
    
}
